import {request} from "../../request";

export function getScheduleById(id){
    return request({
        url:`/sys/schedule/${id}`,
        method:'get'
    })
}


export function getSchedulePage(data){
    return request({
        url:'/sys/schedule/page',
        method:'put',
        data:data
    })
}

export function putSchedule(data){
    return request({
        url:'/sys/schedule',
        method:'put',
        data:data
    })
}
export function postSchedule(data){
    return request({
        url:'/sys/schedule',
        method:'post',
        data:data
    })
}

export function deleteSchedule(data){
    return request({
        url:`/sys/schedule`,
        method:'delete',
        data:data
    })
}
export function exportSchedule(data){
    return request({
        url:`/sys/schedule/export`,
        method:'get',
        data:data,
        responseType:'blob'
    })
}


// 暂停
export function putSchedulePause(data){
    return request({
        url:'/sys/schedule/pause',
        method:'put',
        data:data
    })
}

// 暂停
export function putScheduleResume(data){
    return request({
        url:'/sys/schedule/resume',
        method:'put',
        data:data
    })
}

// 执行
export function putScheduleRun(data){
    return request({
        url:'/sys/schedule/run',
        method:'put',
        data:data
    })
}

